@import "@../../style/icon";
@import "@music-icon";

.backgroud-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;

  width: 100%;
  height: 100%;
}

.music-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  height: 85vh;
  padding-top: 10vh;
  padding-bottom: 5vh;

  background-color: rgba(255, 255, 255, 0.8);

  text-align: center;

  backdrop-filter: blur(8px);

  @media (prefers-color-scheme: dark) {
    background-color: rgba(0, 0, 0, 0.8);
  }
}

.share-button {
  position: absolute;
  top: 120px;
  right: 15px;
  z-index: 10;

  width: auto !important;
  padding: 4px 12px !important;
  border: none !important;
  border-radius: 16px;

  background-color: #666 !important;
  color: #fff !important;

  font-weight: 400;
  font-size: 15px;
  line-height: 1.8;

  .icon-font {
    margin-right: 4px;
  }
}

.music-info {
  height: 10%;
  padding: 0 15px;
  color: var(--dark-grey);
  font-family: -apple-system-font, "PingFang SC", "Helvetica Neue", Helvetica,
    STHeiti, Tahoma, Simsun, sans-serif !important;

  .name {
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 28px;

    @media (min-width: 480px) {
      font-size: 44px;
    }
  }

  .author {
    font-size: 16px;
    @media (min-width: 480px) {
      font-size: 32px;
    }
  }
}

.cover-wrapper {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;

  margin-top: 25px;
}

.cover {
  width: 520rpx;
  max-width: 400px;
  height: 520rpx;
  max-height: 400px;
  border-radius: 50%;

  &.hide {
    width: 0;
    height: 0;
  }
}

.progress-bar {
  align-items: center;
  margin: 10px 28px;
}

.time-wrapper {
  display: flex;
  justify-content: space-between;
  margin: 5px 28px;

  .time {
    color: var(--light-grey);
    font-size: 15px;
  }
}

.button-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.cycle-button {
  width: 60rpx;
  max-width: 35px;
  height: 60rpx;
  max-height: 35px;
  margin: 0 10rpx;
}

.music-wrapper .button {
  width: 70rpx;
  max-width: 40px;
  height: 70rpx;
  max-height: 40px;
}

.play-button {
  width: 100rpx;
  max-width: 56px;
  height: 100rpx;
  max-height: 56px;
}

.button-wrapper .icon {
  width: 100%;
  height: 100%;
}

.button-active {
  filter: grayscale(50%);
}

.music-list {
  flex-shrink: 1;
  overflow: scroll;

  .item {
    position: relative;
    display: flex;
    padding: 6px 0;

    &::after {
      content: " ";

      position: absolute;
      right: 0;
      bottom: 0;
      left: 44px;

      height: 1px;
      border-bottom: 1px solid var(--border-color);

      transform: scaleY(0.4);
      transform-origin: 0 100%;
    }

    &:last-child::after {
      display: none;
    }
  }

  .icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
  }

  .info {
    line-height: 1.4;
    text-align: left;
  }

  .name {
    color: var(--grey3);
    font-size: 16px;
  }

  .singer {
    color: var(--dark-grey);
    font-size: 14px;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: 12s linear 0s normal none infinite rotate;
}
